package cc.mrbird.febs.log.controller;

import cc.mrbird.febs.log.domain.LogBean;
import cc.mrbird.febs.log.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("log")
public class LogController {
    @Autowired
    LogService logService;

    @RequestMapping("uv")
    List<LogBean> listUv(String time) {
        return logService.listUv(time);
    }

    @RequestMapping("pv")
    List<LogBean> listPv(String time) {
        return logService.listPv(time);
    }

    @RequestMapping("ip")
    List<LogBean> listIp(String time) {
        return logService.listIp(time);
    }

    @RequestMapping("count")
    Map<String, Object> countLog(String time) {
        return logService.countLog(time);
    }
}
